public class Test {
    public static void main(String[] args) {
        String str = "abcasjcbahscv";
        //字符串转换为字符数组
        char[] chars = str.toCharArray();
        for (char element : chars) {
            System.out.print(element + " ");
        }
        System.out.println("");
        //生成范围随机数
        for (int i = 0; i < 10; i++) {
            System.out.print(Math.round(Math.random() * 10) + " ");
        }
        System.out.println("");
        for (int i = 1; i < 30; i++) {
            if (i % 3 == 0) {
                break;
            }
            System.out.print(i + " ");
        }
        System.out.println("");
        System.out.println("-------------");
        int i = 1;
        switch (i) {
            case 1:
            case 2:
                System.out.println("2");
                break;
            case 3:
                System.out.println("3");
        }

        System.out.println("-------------");
    }
}
